package com.server.model.all.constant;

public class PatternConstant {

    public static final String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";

    /**
     * IP地址正则表达式
     * @author LXC
     * @date 2022/10/9 22:19
     */
    public static final String REGEX_IP = "^(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|[1-9])\\."
            + "(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\."
            + "(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\."
            + "(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)$";

    /**
     * 手机号正则表达式
     * @author LXC
     * @date 2022/10/9 22:20
     */
    public static final String REGEX_MOBILE_EXACT = "^1(3|4|5|7|8)\\d{9}$";

    /**
     * 邮箱正则表达式
     * @author LXC
     * @date 2022/6/15 21:47
     */
    public static final String REGEX_EMAIL_EXACT = "^\\w+((-\\w+)|(\\.\\w+))*\\@[A-Za-z0-9]+((\\.|-)[A-Za-z0-9]+)*\\.[A-Za-z0-9]+$";


    /**
     * 包含数字正则表达式
     * @author LXC
     * @date 2022/6/15 21:47
     */
    public static final String CONTAIN_NUMBER = ".*[0-9]+.*";

    /**
     * 包含小写字母正则表达式
     * @author LXC
     * @date 2022/6/15 21:47
     */
    public static final String CONTAIN_LOW_LETTER = ".*[a-z].*";

    /**
     * 包含大写字母表达式
     * @author LXC
     * @date 2022/6/15 21:47
     */
    public static final String CONTAIN_CAPITALIZE_LETTER = ".*[A-Z].*";

    /**
     * 请求映射表达式
     * @author LXC
     * @date 2022/11/21 0:09
     */
    public static final String REQUEST_MAPPING = "org\\.springframework\\.web\\.bind\\.annotation\\.(GetMapping|PutMapping|DeleteMapping|PatchMapping|RequestMapping)";
}
